package liangtWorkSpace.strategy.comparatorFile;

import liangtWorkSpace.strategy.comparableFile.Dog;

/**
 * @ClassName Dog
 * @Description : 功能说明
 * @Author : LiangT
 * @Date : 2020/4/10 17:58
 */
public class DogCpmparator implements Comparator<Dog> {
    public DogCpmparator() {
    }

    @Override
    public int compare(Dog o1, Dog o2) {
        if (o1.food < o2.food )return -1;
        else if (o1.food > o2.food) return 1;
        else return 0;
    }
}
